<!--
 * @Description: flex布局-携程
 * @Author: rendc
 * @Date: 2025-09-16 11:02:33
 * @LastEditors: rendc
 * @LastEditTime: 2025-09-16 11:21:38
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>flex布局-携程</title>
  <style>
    body {
      /* border: 1px solid green; */
      height: 100vh;
      margin: 0;
    }

    .app {
      border: 1px solid red;
      /* 将app设置为flex容器 */
      display: flex;
      height: 100%;
    }

    .left,
    .right {
      border: 1px solid red;
    }

    .left {
      flex: 1;
    }

    .right {
      flex: 3;
      display: flex;
      /* 子元素换行 */
      flex-wrap: wrap;
    }

    .inner {
      /* flex: 1; */
      width: calc(20% - 2px);
      height: calc(20% - 2px);
      border: 1px solid red;
    }
  </style>
</head>

<body>
  <div class="app">
    <div class="left">左</div>
    <div class="right">
      <div class="inner">1</div>
      <div class="inner">2</div>
      <div class="inner">3</div>
      <div class="inner">4</div>
      <div class="inner">5</div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner"></div>
      <div class="inner">22</div>
      <div class="inner">23</div>
    </div>
  </div>
</body>

</html>